home *** CD-ROM | disk | FTP | other *** search
/ Inside the White House / Inside the White House.iso / wh_nav.dir / 00003.ls < prev    next >
Encoding:
Text File  |  1995-08-02  |  3.5 KB  |  156 lines

  1. on startMovie
  2.   global node, quad
  3.   set node to 1
  4.   set quad to 2
  5. end
  6.  
  7. on changeQuad dir
  8.   global node, quad
  9.   if dir = "cw" then
  10.     if quad < 4 then
  11.       set q to quad + 1
  12.     else
  13.       set q to 1
  14.     end if
  15.   else
  16.     if dir = "ccw" then
  17.       if quad > 1 then
  18.         set q to quad - 1
  19.       else
  20.         set q to 4
  21.       end if
  22.     end if
  23.   end if
  24.   return q
  25. end
  26.  
  27. on rotate dir
  28.   global node, quad
  29.   if dir = "ccw" then
  30.     set quad to changeQuad(dir)
  31.   end if
  32.   set mov to node & dir & quad & ".MoV"
  33.   puppetSprite(3, 1)
  34.   repeat while the number of cast mov = -1
  35.     set quad to changeQuad(dir)
  36.     set mov to node & dir & quad & ".MoV"
  37.   end repeat
  38.   set the castNum of sprite 3 to the number of cast mov
  39.   updateStage()
  40.   if dir = "cw" then
  41.     set quad to changeQuad(dir)
  42.     set mov to node & dir & quad & ".MoV"
  43.     if the number of cast mov = -1 then
  44.       set quad to changeQuad(dir)
  45.     end if
  46.   else
  47.     set mov to node & dir & changeQuad(dir) & ".MoV"
  48.     if the number of cast mov = -1 then
  49.       set quad to changeQuad(dir)
  50.     end if
  51.   end if
  52.   puppetSprite(16, 1)
  53.   set the castNum of sprite 16 to the number of cast ("arrow" & quad)
  54. end
  55.  
  56. on goNode
  57.   global node, quad
  58.   set temp to node
  59.   set mov to EMPTY
  60.   if quad = 2 then
  61.     set mov to node & "next.MoV"
  62.     set temp to temp + 1
  63.     if temp = 5 then
  64.       set quad to 1
  65.     end if
  66.   else
  67.     if quad = 4 then
  68.       if node <> 5 then
  69.         set mov to node & "prev.MoV"
  70.         set temp to temp - 1
  71.       end if
  72.     else
  73.       if quad = 3 then
  74.         if node = 3 then
  75.           set mov to "ENTin.MoV"
  76.           set temp to 9
  77.         else
  78.           if node = 5 then
  79.             set mov to node & "prev.MoV"
  80.             set temp to temp - 1
  81.             set quad to 4
  82.           else
  83.             if node = 6 then
  84.               set mov to "GRNout.MoV"
  85.               set temp to 2
  86.             else
  87.               if node = 7 then
  88.                 set mov to "REDout.MoV"
  89.                 set temp to 4
  90.               else
  91.                 if node = 8 then
  92.                   set mov to "BLUEout.MoV"
  93.                   set temp to 3
  94.                 end if
  95.               end if
  96.             end if
  97.           end if
  98.         end if
  99.       else
  100.         if quad = 1 then
  101.           if node = 4 then
  102.             set mov to "REDin.MoV"
  103.             set temp to 7
  104.           else
  105.             if node = 3 then
  106.               set mov to "BLUEin.MoV"
  107.               set temp to 8
  108.             else
  109.               if node = 2 then
  110.                 set mov to "GRNin.MoV"
  111.                 set temp to 6
  112.               else
  113.                 if node = 9 then
  114.                   set mov to "ENTout.MoV"
  115.                   set temp to 3
  116.                 end if
  117.               end if
  118.             end if
  119.           end if
  120.         end if
  121.       end if
  122.     end if
  123.   end if
  124.   if mov = EMPTY then
  125.     exit
  126.   end if
  127.   set n to the number of cast mov
  128.   if n = -1 then
  129.     exit
  130.   end if
  131.   puppetSprite(3, 1)
  132.   set the castNum of sprite 3 to n
  133.   set node to temp
  134.   puppetSprite(16, 0)
  135.   go("node" & node)
  136.   puppetSprite(16, 1)
  137.   set the castNum of sprite 16 to the number of cast ("arrow" & quad)
  138.   updateStage()
  139. end
  140.  
  141. on trackCursor
  142.   if rollOver(10) then
  143.     set icursor to the number of cast "left"
  144.   end if
  145.   set the cursor of sprite 10 to [icursor, icursor + 1]
  146.   if rollOver(11) then
  147.     set icursor to the number of cast "right"
  148.   end if
  149.   set the cursor of sprite 11 to [icursor, icursor + 1]
  150.   if rollOver(12) then
  151.     set icursor to the number of cast "forward"
  152.   end if
  153.   set the cursor of sprite 12 to [icursor, icursor + 1]
  154.   go(the frame)
  155. end
  156.